home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
FROMUTS
/
ARCAUT
/
Automatons
/
Gasket
< prev
next >
Wrap
Text File
|
1991-07-27
|
708b
|
37 lines
AUTOMATON*
Gasket
This automaton grows a structure resembling the well known Sierpinski
gasket. The Moore neighbourhood is used.
INITIALISATION*
10DEF PROCdo
20*SetEval wrap off
30*SetEval border dead
40ENDPROC
SCREEN*
10DEF PROCdo
20DIM buf% 256:SYS "OS_ReadVarVal","suy",buf%,256
30GCOL 128 TINT 0:CLG
40GCOL 63 TINT 255:POINT 0,!buf%*2-8
50ENDPROC
CODE*
( CELL 0 <> IF (CELL ==)
READ_NEIG
TR 253 = IF (TL 245 = IF (243 ==))
TR 252 > IF (TR 1 - ==)
TL 255 = IF (244 ==)
TL 243 > IF (TL 246 < IF (TL 1 + ==))
MR 245 > IF (MR 251 < IF (MR 1 + ==))
MR 243 = IF (247 ==)
TM 252 = IF (255 ==)
TM 246 = IF (255 ==)
dead == )
END*